package com.wms.system.api;

import com.wms.common.core.constant.ServiceNameConstants;
import com.wms.common.core.domain.R;
import com.wms.common.core.web.domain.AjaxResult;
import com.wms.system.api.domain.SysRole;
import com.wms.system.api.factory.RemoteUserFallbackFactory;
import com.wms.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 用户服务
 * 
 * @author wms
 */
@FeignClient(contextId = "remoteRoleService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteRoleService
{
    /**
     * 通过roleId查询用户角色信息
     *
     * @param roleId 用户名
     * @return 结果
     */
    @GetMapping(value = "/role/{roleId}")
    R<AjaxResult> getInfo(@PathVariable("roleId") Long roleId);

    /**
     * 查询所有当前租户下的用户
     * @return
     */
    @GetMapping(value = "/user/all")
    R<List> selectAllUser();


    /**
     *
     * @return
     */
    @GetMapping(value = "/role/getList")
    R<List> getRoleList(SysRole role);


}
